From 9e9df66b8180f348a5906daa3007e889cedfb292 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 28 Sep 2017 18:58:18 -0400 Subject: [PATCH] Recorder: Show details of border nodes --- gtk/inspector/recorder.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 0da4f41abe..6b2d2657c8 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c @@ -349,6 +349,34 @@ populate_render_node_properties (GtkListStore *store, } break; + case GSK_BORDER_NODE: + { + const char *name[4] = { "Top", "Right", "Bottom", "Left" }; + const float *widths = gsk_border_node_peek_widths (node); + const GdkRGBA *colors = gsk_border_node_peek_colors (node); + int i; + + for (i = 0; i < 4; i++) + { + cairo_surface_t *surface; + char *text, *text2; + + surface = get_color_surface (&colors[i]); + text = gdk_rgba_to_string (&colors[i]); + text2 = g_strdup_printf ("%.2f, %s", widths[i], text); + gtk_list_store_insert_with_values (store, NULL, -1, + 0, name[i], + 1, text2, + 2, TRUE, + 3, surface, + -1); + g_free (text); + g_free (text2); + cairo_surface_destroy (surface); + } + } + break; + default: ; } } -- 2.30.2